package com.atguigu.gmall.all.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class PassportController {

    @GetMapping("login.html")
    public String login(HttpServletRequest request){
        // 后台需要存储 ${originUrl}   originUrl 表示记录从哪里点击的登录地址 ，如果登录成功之后，还要跳回哪里.
        String originUrl = request.getParameter("originUrl");
        request.setAttribute("originUrl",originUrl);
        //  返回登录页面.
        return "login";
    }
}